<?php

App::uses('Controller', 'Controller');
App::uses('SzamKezelo', 'Lib/Utility');

class SzamKezeloTest extends CakeTestCase {
	public $SzamKezelo = null;

	public function setUp() {
		parent::setUp();
		$this->SzamKezelo = new SzamKezelo();
	}

	public function testFloatFromString(){
		$actual = $this->SzamKezelo->floatFromString('5 000');
		$expected = 5000;
		$this->assertEquals($expected, $actual);

		$actual = $this->SzamKezelo->floatFromString('5 000,25');
		$expected = 5000.25;
		$this->assertEquals($expected, $actual);
		
		$actual = $this->SzamKezelo->floatFromString('10 000 000');
		$expected = 10000000;
		$this->assertEquals($expected, $actual);
	}
}
?>